/***************************************************************
 * 系统名称           : 智慧零售(SmartRetail)
 * 处理内容           : 光标帮助类
 * @author            : geping@2019-02-18
 * @Modify            : 
 * @version           : v1.0
 * @Copyright         : 浙江康铭泰克信息科技股份有限公司
 * @Description       : 
 ***************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WinApp = System.Windows.Forms.Application;

namespace Comteck.Winforms.Utils {
  /// <summary>
  /// 鼠标等待框
  /// </summary>
  public class CursorWait : IDisposable {
    /// <summary>
    /// 
    /// </summary>
    public CursorWait() {
      WinApp.UseWaitCursor = true;
      // Wait
      Cursor.Current = Cursors.WaitCursor;
    }

    /// <summary>
    /// 
    /// </summary>
    public void Dispose() {
      // Reset
      Cursor.Current = Cursors.Default;
      WinApp.UseWaitCursor = false;
    }
  }
}
